﻿@using FlowBasisSampleSite.Domain.Entities
@{
    ViewBag.Title = "Role";

    Role role = ViewBag.Role;
}

<h2>Role</h2>

<div>
@role.Name
</div>

<div>
    <div>UserAccounts</div>
    <ul>
        @foreach (var userAccount in role.UserAccounts)
        {
            <li>
                @Html.ActionLink(userAccount.DisplayName, "Info", "UserAccounts", new { id = userAccount.UserAccountId }, null)
            </li>
        }
    </ul>
</div>

<div>
    <div>Permissions</div>
    <ul>
        @foreach (var permission in role.Permissions)
        {
            <li>
                @Html.ActionLink(permission.Name, "Info", "Permissions", new { id = permission.PermissionId }, null)
            </li>
        }
    </ul>
</div>